from django.conf.urls import url
from django.urls import path, re_path

from label import views
from label.views import UploadView

urlpatterns = [
    # 历史记录
    re_path(r'^w/(?P<wheel_type>.+)/$', views.wheel_history, name='history'),
    # 历史记录选择列表
    re_path(r'^read/(?P<wheel_id>p[0-9]{2})/$', views.wheel_list, name='list'),
    # 新增轮型
    re_path(r'^new/$', views.new_wheel, name='new'),
    # 历史记录更新
    re_path(r'^history_update/(?P<wheel_id>p[0-9]{2})/$', views.wheel_history_update, name='history_update'),
    # 确认画面
    re_path(r'^confirm/(?P<wheel_id>[0-9]+)/$', views.wheel_confirm, name='list'),
    # 打印画面
    re_path(r'^print/(?P<wheel_id>[0-9]{2})/$', views.wheel_print, name='list'),
    # 上传
    url(r'^upload(?:/(?P<qquuid>\S+))?', UploadView.as_view(), name='upload'),
    # 首页
    path('', views.index, name='index'),

]
